/*
 * (C) Copyright 2012. AePONA Limited. All Rights Reserved.
 *
 * These materials are unpublished, proprietary,
 * confidential source code of AePONA Limited and constitute a TRADE SECRET of AePONA Limited.
 *
 * AePONA Limited retains all title to and intellectual property rights in these materials.
 */

package com.aeopna.app;

import org.apache.log4j.Logger;

/**
 * Created by IntelliJ IDEA.
 * User: Aruna Rajapaksha
 * Date: 3/16/12
 * Time: 12:06 PM
 */

public class Authentication {

    static Logger logger = Logger.getLogger(Authentication.class);

    public String login(String user, String password) {

        logger.info("Received UserName: \"" + user + "\" Password: * ");

        if (user == null || password == null) {
            return "-1|Error";
        }

        if ((user.equalsIgnoreCase("aepona")) && (password.equals("pWd123$"))) {
            return "1|OK";
        } else {
            return "0|NO";
        }

    }

}
